/**
 * Created with Intellij IDEA.
 * Description:
 * User: 33013
 * Date: 2023-10-16
 * Time: 21:36
 */
import java.util.*;
public class Test {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int len = in.nextInt();
        int[] arr = new int[len];
        int sum = 0;
        int mul = 1;
        for(int i = 0; i < len; i++){
            arr[i] = in.nextInt();
            sum += arr[i];
            mul *= arr[i];
        }
        int amount = 0;
        if(sum > mul){
            amount++;
        }
        Arrays.sort(arr);
        for(int i = 0; i < len; i++){
            if((sum - arr[i]) > (mul / arr[i])){
                amount++;
            }
            i++;
            while(i < len && arr[i] != arr[i - 1]){
                i++;
            }
            i--;
        }
        System.out.println(amount);
    }
}
